
import Head from 'next/head'

<Head>
  <script>
    {
      `(function() {
         var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "https://hm.baidu.com/hm.js?e60fb290e204e04c5cb6f79b0ac1e697";
  var s = document.getElementsByTagName("script")[0]; 
  s.parentNode.insertBefore(hm, s);
})();
       })();`
    }
  </script>
</Head>

![LangChain](https://pica.zhimg.com/50/v2-56e8bbb52aa271012541c1fe1ceb11a2_r.gif)






指南
=================================================================




 Types类别
 [#](#types "Permalink to this headline")
-------------------------------------------------



第一组示例突出显示了不同类型的内存。

* [ConversationBufferMemory（对话缓冲区内存）](types/buffer)
* [ConversationBufferWindowMemory（对话缓冲区窗口内存）](types/buffer_window)
* [Entity Memory（实体内存）](types/entity_summary_memory)
* [Conversation Knowledge Graph Memory（对话知识图谱内存）](types/kg)
* [ConversationSummaryMemory（对话总结内存）](types/summary)
* [ConversationSummaryBufferMemory（对话总结缓冲区内存）](types/summary_buffer)
* [ConversationTokenBufferMemory（对话标记缓冲区内存）](types/token_buffer)
* [VectorStore-Backed Memory（向量存储器支持的内存）](types/vectorstore_retriever_memory)





 Usage用法
 [#](#usage "Permalink to this headline")
-------------------------------------------------



这里的示例演示了如何以不同的方式使用内存。

* [如何将内存添加到LLMChain中](examples/adding_memory)
* [如何向多输入链添加内存](examples/adding_memory_chain_multiple_inputs)
* [如何向代理添加内存](examples/agent_with_memory)
* [将由数据库支持的消息内存添加到代理中](examples/agent_with_memory_in_db)
* [如何自定义对话内存](examples/conversational_customization)
* [如何创建自定义的内存类](examples/custom_memory)
* [“摩托头”内存（Motörhead Memory）](examples/motorhead_memory)
* [如何在同一链中使用多个内存类](examples/multiple_memory)
* [Postgres聊天消息记录](examples/postgres_chat_message_history)
* [Redis聊天消息记录](examples/redis_chat_message_history)






